package com.my.blog.website.controller.ErrorHandler;

import org.springframework.boot.autoconfigure.web.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;

/**
 * @author geng
 * @title: HttpErrorController
 * @projectName my-blog
 * @description: TODO
 * @date 2020/1/10 -- 20:27
 */
@Controller
public class HttpErrorController implements ErrorController {

    private static final String ERROR_PATH = "/error";

    @RequestMapping(value = ERROR_PATH)
    public String handleError() {
        return "comm/error_404";
    }

    @Override
    public String getErrorPath() {
        return ERROR_PATH;
    }

}
